package com.shnu.cyn.studentscore.service;

import com.shnu.cyn.studentscore.dao.ClassDao;
import com.shnu.cyn.studentscore.entity.ClassEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassService {
    @Autowired
    private ClassDao classDao;

    public ClassEntity getClassEntity(String id)
    {
        return classDao.getOne(id);
    }

    public ClassEntity save(ClassEntity entity)
    {
        return classDao.save(entity);
    }


    public List<ClassEntity> findAll() {
        return classDao.findAll();
    }
}
